home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
maestixlib.lha
/
Maestix
/
maestix-e.adoc
< prev
next >
Wrap
Text File
|
1995-03-29
|
13KB
|
472 lines
TABLE OF CONTENTS
(V35) maestix.library/AllocMaestro
(V36) maestix.library/FlushReceive
(V36) maestix.library/FlushTransmit
(V35) maestix.library/FreeMaestro
(V35) maestix.library/GetStatus
(V35) maestix.library/ReceiveData
(V35) maestix.library/SetMaestro
(V38) maestix.library/StartRealtime
(V38) maestix.library/StopRealtime
(V35) maestix.library/TransmitData
maestix.library/AllocMaestro maestix.library/AllocMaestro
NAME
AllocMaestro -- Allocates the Maestro soundcard (V35)
SYNOPSIS
^MaestroBase = AllocMaestro (^Tags)
D0.l A0.l
FUNCTION
This function allocates the Maestro soundcard and gives
exclusive access to the client.
The default settings after AllocMaestro() are:
Input is INPUT_STD,
Output is OUTPUT_BYPASS,
Studio mode is turned off,
Copy protection is turned off,
Emphasis is turned off,
Source is DAT,
Rate is 48kHz,
Validity is true,
the UDBs are reset.
INPUTS
Tags Reserved for future options. Currently always
NULL or a pointer to TAG_DONE.
RESULTS
MaestroBase Pointer to the MaestroBaseStruct (private) or
NULL, if the card has already been allocated
or is not present.
NOTES
This function must be used from DOS process only!
SEE ALSO
FreeMaestro()
BUGS
This function cannot prevent the MacroSystem programs (MaestroBR
and Samplitude) from using Maestro, too.
This function tries to detect if such a program is currently
using the card, and does not allow a second allocation. But
this try may fail, so be aware! Since some old Maestix failed
even in the case the card was not allocated, this test was
removed in V37. Use AllocMstx and FreeMstx to avoid this
problem.
maestix.library/FlushReceive maestix.library/FlushReceive
NAME
FlushReceive -- Stops receiver and replies all messages (V36)
SYNOPSIS
FlushReceive (^MaestroBase)
A0.l
FUNCTION
This function stops the receiver.
All messages sent to Maestix by ReceiveData() are replied.
INPUTS
MaestroBase Pointer to MaestroBaseStruct from AllocMaestro().
RESULTS
NOTES
SEE ALSO
FlushTransmit(), ReceiveData()
BUGS
maestix.library/FlushTransmit maestix.library/FlushTransmit
NAME
FlushTransmit -- Stops transmission and replies all messages (V36)
SYNOPSIS
FlushTransmit (^MaestroBase)
A0.l
FUNCTION
This function stops the transmitter.
All messages sent to Maestix by TransmitData() are replied.
INPUTS
MaestroBase Pointer to MaestroBaseStruct from AllocMaestro().
RESULTS
NOTES
SEE ALSO
FlushReceive(), TransmitData()
BUGS
maestix.library/FreeMaestro maestix.library/FreeMaestro
NAME
FreeMaestro -- Frees the Maestro soundcard (V35)
SYNOPSIS
FreeMaestro (^MaestroBase)
A0.l
FUNCTION
The client must use this function to free the Maestro when he
does not need it any more.
All messages previously sent to Maestix will be replied. The
FIFOs are cleared, the card is reset and switches to bypass
mode.
INPUTS
MaestroBase Pointer to MaestroBaseStruct from AllocMaestro().
RESULTS
NOTES
This function must be used from DOS process only!
SEE ALSO
AllocMaestro()
BUGS
maestix.library/GetStatus maestix.library/GetStatus
NAME
GetStatus -- Returns the current card status (V35)
SYNOPSIS
Status = GetStatus (^MaestroBase,info type)
D0.l A0.l D0.l
FUNCTION
The status fitting to the info type will be returned.
INPUTS
MaestroBase Pointer to MaestroBaseStruct from AllocMaestro().
info type Type code (MSTAT_...) of the status value that
should be returned.
RESULTS
Status The result of the status query.
NOTES
The following info types are existing:
MSTAT_TFIFO Status of transmitter FIFO
- FIFO_Off -> transmitter is off
- FIFO_Running -> transmission is running
- FIFO_Error -> an error occured since
last query
MSTAT_RFIFO Status of receiver FIFO
- FIFO_Off -> receiver is off
- FIFO_Running -> receiver is running
- FIFO_Error -> an error occured since
last query
MSTAT_Signal checks the signal at the current INPUT.
FALSE if there is no signal (BOOL).
MSTAT_Emphasis returns TRUE if the input signal has been
recorded using emphasis. (BOOL)
MSTAT_DATsrc returns TRUE if the data source is a DAT
or DCC recorder. (BOOL)
MSTAT_CopyProh returns TRUE if copy protection is requested
from source. It is not possible to detect
if it is an original or a copy! (BOOL)
MSTAT_Rate returns input rate (ULONG).
MSTAT_UDB [V37] returns the current UDBs (UBYTE).
SEE ALSO
BUGS
maestix.library/ReceiveData maestix.library/ReceiveData
NAME
ReceiveData -- Receives data into a message (V35)
SYNOPSIS
ReceiveData (^MaestroBase, ^DataMessage)
A0.l A1.l
FUNCTION
The client has to fill out a DataMessage structure with a
reply port, a pointer to a data buffer and the size of this
buffer.
This message is queued internally. If the receiver has not
been started yet, this function will activate it.
The buffer space get filled with the incoming data and will
be replied to the declared reply port when the space has been
filled completely.
If there are no more messages in the queue, the receiver
will be stopped automatically, and an error is reported.
The buffer is filled with signed words. The first word always
belongs to the left channel, the second to the right, and so
on.
INPUTS
MaestroBase Pointer to MaestroBase Struct from AllocMaestro().
Message Pointer to a system message with a pointer to
a buffer space for incoming data.
RESULTS
NOTES
The buffer space must be public memory. Its address must be
longword aligned and its length must be aligned to 1024.
SEE ALSO
TransmitData(), FlushReceive()
BUGS
maestix.library/SetMaestro maestix.library/SetMaestro
NAME
SetMaestro -- Sets the Maestro parameters (V35)
SYNOPSIS
SetMaestro (^MaestroBase, ^Tags)
A0.l A1.l
FUNCTION
The card parameters are changed by the tags.
INPUTS
MaestroBase Pointer to MaestroBase Struct from AllocMaestro().
Tags Tag list with the changes
RESULTS
TAGS
MTAG_Input (ULONG) selects the input that shall be used.
Default is INPUT_STD, which is the input
selected by SetMstx. INPUT_OPTICAL and
INPUT_COAXIAL select the corresponding input.
INPUT_SRC48K selects the internal 48kHz source.
MTAG_Output (ULONG) selects the data source for the Maestro
output. Default is OUTPUT_BYPASS which leads
the incoming data directly to the output.
OUTPUT_INPUT decodes the input signal and
encodes it with new channel status bits and
user data bits. OUTPUT_FIFO encodes the trans-
ferred data to output.
MTAG_SetCSB (ULONG) The 32 bit will be put into the channel
status bits directly. This tag should be used
only exceptional.
MTAG_SetUDB (ULONG) The 32 bit will be put into the user
data bits.
MTAG_Studio (BOOL) The studio mode is selected if this
tag is TRUE, otherwise the custom mode is
selected. Defaults to FALSE.
MTAG_CopyProh (ULONG) CPROH_OFF turns the copy protection
off. CPROH_ON enables the copy protection,
but one single digital copy can be made.
CPROH_PROHIBIT turns the copy protection on;
the signal cannot be recorded. CPROH_INPUT
turns the copy protection on or off correspon-
ding to the input signal. Default is CPROH_OFF.
MTAG_Emphasis (ULONG) EMPH_OFF turns emphasis off. EMPH_50us
(= EMPH_ON) turns standard emphasis on. When
using studio mode, EMPH_CCITT and EMPH_MANUAL
can be selected, too. EMPH_INPUT chooses the
emphasis corresponding to the input signal.
Default is EMPH_OFF.
MTAG_Source (ULONG) selects the source category code.
Default is SRC_DAT. Other codes are SRC_DSR,
SRC_CD, SRC_ADCONV and SRC_INSTR. SRC_INPUT
selects SRC_DAT or SRC_CD, corresponding to
the input signal.
MTAG_Rate (ULONG) selects the rate. RATE_48000 is default,
RATE_44100, RATE_32000 and RATE_48000MANU are
possible, too. RATE_INPUT chooses a rate
corresponding to the input signal.
MTAG_Validity (BOOL) TRUE if the output signal is valid,
otherwise FALSE. Most receivers do not react
if MTAG_Validity is FALSE.
MTAG_ResetUDB If this tag occures, UDBs are reset and will
not be put out any more.
MTAG_ResetLSA This tag clears the local sample address which
is used in studio mode transfers only.
NOTES
Note that MTAG_Rate will only be transmitted in the channel
status bits and is completely independent to the rate that
Maestro uses for data transfer. Maestro is only capable to
generate a 48kHz rate (INPUT_SRC48K). If another rate is
required, it must be put to the choosen input.
Some receivers do not accept the incoming signal if the
transmitted rate is not equal to the transfer rate.
This function must be used from DOS process only!
SEE ALSO
BUGS
maestix.library/StartRealtime maestix.library/StartRealtime
NAME
StartRealtime -- Starts realtime FX (V38)
SYNOPSIS
StartRealtime (^MaestroBase, ^Tags)
A0.l A1.l
FUNCTION
This function starts a realtime effect. Before that, the used
input and OUTPUT_FIFO should be selected.
INPUTS
MaestroBase Pointer to MaestroBase Struct from AllocMaestro().
Tags Tag list with the effect parameter
RESULTS
TAGS
MTAG_Effect Selects one of the internal effects (default:
RFX_Bypass). See include file for all available
effects.
MTAG_A0 Effect parameter
MTAG_A1 Effect parameter
MTAG_D2 Effect parameter
MTAG_D3 Effect parameter
MTAG_CustomCall (APTR) Pointer to a custom effect routine.
NOTES
The custom effect routine gets the following parameters:
-> D0 (WORD) left data word
-> D1 (WORD) right data word
-> D2 (ULONG) see MTAG_D2
-> D3 (ULONG) see MTAG_D3
-> D6 (ULONG) scratch
-> D7 (ULONG) scratch
-> A0 (ULONG) see MTAG_A0
-> A1 (ULONG) see MTAG_A1
-> A2 (APTR) return address
The routine's results are:
<- D0 (WORD) new left data word
<- D1 (WORD) new right data word
The register D2 to D5 and A0 to A7 must not be changed!
Use "JMP (A2)" to return from the effect routine. Don't use RTS.
The effect routine must be in MEMF_PUBLIC memory. Note that a task
must not be necessarily in MEMF_PUBLIC memory! This routine should
be coded in high optimized assembly language.
If the effect routine is too slow on the used processor, this
function will be stopped automatically, and MSTAT_TFIFO and
MSTAT_RFIFO result FIFO_Error.
SEE ALSO
StopRealtime()
BUGS
maestix.library/StopRealtime maestix.library/StopRealtime
NAME
StopRealtime -- Stops the realtime FX (V38)
SYNOPSIS
StopRealtime (^MaestroBase)
A0.l
FUNCTION
This function stops a realtime effect.
INPUTS
MaestroBase Pointer to MaestroBase Struct from AllocMaestro().
RESULTS
NOTES
Before using TransmitData() or ReceiveData(), a currently running
realtime effect must be stopped by this function!
SEE ALSO
StartRealtime()
BUGS
maestix.library/TransmitData maestix.library/TransmitData
NAME
TransmitData -- Transmits data from a message (V35)
SYNOPSIS
TransmitData (^MaestroBase, ^Message)
A0.l A1.l
FUNCTION
The client has to fill out a DataMessage structure with a
reply port, a pointer to a data buffer and the size of this
buffer.
This message is queued internally. If the transmitter has not
been started yet, this function will activate it.
The buffer space will be put out and then be replied to the
declared reply port.
If there are no more messages in the queue, the transmitter
will be stopped automatically, and an error is reported.
The buffer contains signed words. The first word always belongs
to the left channel, the second to the right, and so on.
INPUTS
MaestroBase Pointer to MaestroBase Struct from AllocMaestro().
Message Pointer to a system message with a pointer to
a buffer space for incoming data.
RESULTS
NOTES
The buffer space must be public memory. Its address must be
longword aligned and its length must be aligned to 1024.
SEE ALSO
ReceiveData(), FlushTransmit()
BUGS